Customizing the SNiFF+ <Meta> key (Unix only)

By default, SNiFF+ recognizes the Xwindows modifier key 1 (

mod1 ) as <Meta> . Some vendors use the same modifier key for generating special characters. Using the same <Meta><key> combination for generating special characters and as a SNiFF+ keyboard shortcut can cause a conflict. In such a case the special character is generated and the SNiFF+ keyboard shortcut is executed as well. If you want to use a special modifier for SNiFF+ keyboard shortcuts, you can redefine the Xwindows modifier keys and tell SNiFF+ to recognize a different key as <Meta> .
The following text shows a standard keyboard mapping on an HP as output by the xmodmap utility:

% xmodmap -pm |
xmodmap: | up to 3 keys per modifier, (keycodes in parentheses):
shift | Shift_R (0xc), Shift_L (0xd)
lock | Caps_Lock (0x37)
control | Control_L (0xe)
mod1 | Meta_R (0xa), Meta_L (0xb), Mode_switch (0x36)
mod2 |
mod3 |
mod4 |
mod5 |

The output shows that both the left and the right

<Meta> keys are translated to mod1 .
To change the mapping, follow these steps:

- Modify the Xwindows key map with

xmodmap . To associate mod2 with the left <Meta> key in the example above, you could type the following:

% xmodmap - |
clear mod1 |
clear mod2 |
add mod1 = | Meta_R Mode_switch
add mod2 = | Meta_L
<CTRL>D |

You can apply the modification at every start-up of your Xwindows server by adding the appropriate lines to the

.xinitrc file. (Please refer to the Xwindows documentation for more information.) Please note that the Mode_switch key may not be necessary on your machine.
- On Unix:
Load the $HOME/.sniffrc/UserPrefs.sniff (or the $SNIFF_DIR/ SitePrefs.sniff ) into an editor.
- Search for the second occurrence of
UseModifierKey and change it to the modifier you have selected with xmodmap . For example, modify the entry as follows:
"*.UseModifierKey" [ 2 ]
Please be careful that you are not modifying the schema entry
"*.UseModifierKey" [ ! 1 "AnyInt" ] , which needs to stay exactly as shown. Also make sure that you insert a blank before and after the modifier number. You can set modifier numbers from 1 to 5.
- Restart SNiFF+.
SNiFF+ now uses the changed modifier key as <Meta> , which does not interfere with the other modifier key that can be used for generating special characters.